package com.Service;

import com.Dao.BookshelfDao;
import com.pojo.Bookshelf;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
@Slf4j
public class BookshelfService {
   @Autowired
   private BookshelfDao bookshelfDao;
    public int addToBookshelf(Bookshelf bookshelf) throws SQLException {
        return bookshelfDao.addToBookshelf(bookshelf);
    }
    public List<Bookshelf>getMyBook(String username) throws SQLException {
       return bookshelfDao.getMyBook(username);
    }
}
